//package src;
import java.awt.*;

public class DrawLine extends Order 
{
 
 private int x1, y1;	         		

	public void mousePressExe(Point p, Drawing Layer)
	{
 		x1 = p.x;
 		y1 = p.y;
 		ShapeLine s = new ShapeLine(x1, y1, x1, y1, Layer.getColor());
 		Layer.add(s);	
	}

	public void mouseDragExe(Point p, Drawing Layer, GraphicsObject graphics)
	{
 		ShapeLine line = new ShapeLine(x1, y1, p.x, p.y, Layer.getColor());
 		Layer.remainEndshape(line);	
	}
}